//
//  forgetNextViewController.m
//  mytext
//
//  Created by wj on 16/6/6.
//  Copyright © 2016年 wj. All rights reserved.
//

#import "forgetNextViewController.h"


@interface forgetNextViewController ()

@end

@implementation forgetNextViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    
    self.title = @"找回密码";
    self.btn.layer.cornerRadius = 5;
    self.btnTop.constant = [FrameTool getToolY:167];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/
- (IBAction)commit:(id)sender
{
    if (self.passWordT1.text.length == 0) {
        [SVProgressHUD showErrorWithStatus:@"请输入密码"];
        return;
    }
    if (self.passWordT2.text.length == 0) {
        [SVProgressHUD showErrorWithStatus:@"请再输入密码"];
        return;
    }
    if (![self.passWordT1.text isEqualToString:self.passWordT2.text]) {
        [SVProgressHUD showErrorWithStatus:@"两次输入密码不对"];
        return;
    }
    
    NSDictionary* dic = @{@"mobile":self.mobile,@"password":self.passWordT1.text,@"confirm_password":self.passWordT2.text};
//    [[LJFNetworkingManager shareManager] POST:MODIFYPASSURL parameters:dic success:^(id returnData, int code, NSString *msg)
//     {
//         if (code == 200)
//         {
//             NSLog(@"msg == %@",msg);
//             [SVProgressHUD showSuccessWithStatus:returnData];
//             [self dismissViewControllerAnimated:YES completion:nil];
//             
//         }else
//         {
//             NSLog(@"msg == %@",msg);
//             [SVProgressHUD showErrorWithStatus:msg];
//         }
//     } failure:^(NSError *error)
//     {
//         
//     } showHUD:self.view];
}

@end
